import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(title: const Text("你好Flutter")),
      body: MyApp(),
    ),
  ));
}

class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return const Center(
      child: Text(
        "你好!flutter,我是一个自定义组件",
        textDirection: TextDirection.ltr,
        style: TextStyle(
          color: Colors.cyanAccent,
          //   color: Color.fromRGBO(244, 244, 1, 1),
            fontSize: 40),
      ),
    );
  }
}

// void main() {
//   runApp(MyApp());
// }
//
// class MyApp extends StatelessWidget {
//
//   Widget build(BuildContext buildContext) {
//     return MaterialApp(
//       title: 'Flutter Demo',
//       theme: ThemeData(
//         primarySwatch: Colors.blue,
//       ),
//       home: MyHomePage(title: 'Flutter Demo Home Page'),
//     );
//   }
// }
//
// class MyHomePage extends StatelessWidget{
//   // late String title;
//   MyHomePage({required String title});
//
//   @override
//   Widget build(BuildContext context) {
//     return Text("data");
//   }
// }
